package com.yb.livewykt.net

import com.google.gson.JsonObject
import com.yb.livewykt.bean.LiveRTMP
import com.yb.livewykt.bean.Me
import okhttp3.MultipartBody
import retrofit2.http.*

interface UserApi {


    @POST(LiveUrl.login)
    suspend fun login(@Body hashMap: HashMap<String, Any>) : Result<Me>

    @POST(LiveUrl.GETPULLRTMP)
    suspend fun getHistoryLiveData(@Query("needRecord")needRecord :Boolean = false) : Result<LiveRTMP>

    @Multipart
    @POST(LiveUrl.GETPULLRTMP)
    suspend fun startLive(@Part part: List<MultipartBody.Part>,@Query("needRecord")needRecord :Boolean = false):Result<LiveRTMP>

    @Headers("Content-Type: application/json")
    @PUT(LiveUrl.closeLive)
    suspend fun closeLive(@Query("id") id:Int)



}